package com.finance.rule.computer;

import com.finance.base.enums.MajorTypeEnum;
import com.finance.report.bean.pojo.LogisticsData;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 缺省的主件拖件解析规则
 * 所有运单均是主件 不含拖件
 */
@Service("defaultMajorAnalyzer")
@Scope("prototype")
public class DefaultMajorAnalyzer implements IMajorAnalyzer,Serializable {

    @Override
    public MajorTypeEnum majorTyeOf(LogisticsData data) {
        return MajorTypeEnum.MAJOR;
    }

    @Override
    public boolean isSingle(LogisticsData data) {
        return true;
    }

    @Override
    public List<LogisticsData> getOtherParts(LogisticsData logisticsData) {
        return new ArrayList<>();
    }

    @Override
    public void init(String json) {

    }
}
